package com.designpattern.adpter;

//客户端类： 想上网，插不上网线
public class Computer {
    public void ner(NetToUsb adapter){
//        上网的具体实现
        adapter.handleRequest();
    }

//    类适配器
    public static void main(String[] args) {
        Computer computer = new Computer();
        Adapter adapter = new Adapter();

        computer.ner(adapter);
    }

    //组合 对象适配器
//    public static void main2(String[] args) {
//
//        Computer computer = new Computer();
//        Adaptee adaptee = new Adaptee();
//        Adapter2 adapter = new Adapter2(adaptee);
//        computer.ner(adapter);
//    }
}
